package com.arcaneshift.model.util;

import com.arcaneshift.model.action.game.ArenaMap;
import com.arcaneshift.model.action.game.Nexus;
import com.arcaneshift.model.action.game.Player;
import com.arcaneshift.model.action.game.Terran;

public class ArenaGenerator {

	public static final int TERRAN_X = 11;
	public static final int TERRAN_Y = 11;
	
	private ArenaGenerator() {}
	
	public static ArenaMap generateRandomMap() {
		return new ArenaMap(TERRAN_X, TERRAN_Y);
	}
	
	public static Terran generateRandomTerran() {
		Terran terran = new Terran(TERRAN_X, TERRAN_Y);
		terran.setName("Soilground");
		
		return terran;
	}

	public static void loadPlayersNexuses(ArenaMap arena, Player player1, Player player2) {
		Nexus life;
		
		for (int i = 1; i < 10; i += 2) {
			life = new Nexus(player1.getPlayerNumber());
			arena.set(0, i, life);
			
			life = new Nexus(player2.getPlayerNumber());
			arena.set(10, i, life);
		}
	}
}